/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
header {
    background-color: #1a5e9a;
    color: white;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    padding: 10px 0;
}

.logo img {
    height: 60px;
    margin-right: 15px;
}

.logo span {
    font-size: 1.5rem;
    font-weight: bold;
}

/* 桌面端导航 */
.desktop-nav ul {
    display: flex;
    list-style: none;
}

.desktop-nav li {
    position: relative;
}

.desktop-nav a {
    color: white;
    text-decoration: none;
    padding: 25px 15px;
    display: block;
    transition: background-color 0.3s;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    background-color: #0f4c81;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 移动端导航 */
.mobile-nav {
    display: none;
    background-color: #1a5e9a;
    position: absolute;
    width: 100%;
    left: 0;
    top: 100%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.mobile-nav.active {
    display: block;
}

.mobile-nav ul {
    list-style: none;
}

.mobile-nav a {
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    display: block;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-nav a:hover,
.mobile-nav a.active {
    background-color: #0f4c81;
}

/* 轮播图区域 */
.hero {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.slider {
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 30px;
}

.slide-content h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.slider-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.slider-controls button {
    background: rgba(0,0,0,0.3);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.3s;
}

.slider-controls button:hover {
    background: rgba(0,0,0,0.6);
}

.slider-indicators {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.indicator.active {
    background: white;
}

/* 关于学校 */
.about {
    padding: 60px 0;
    background-color: white;
}

.about h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #1a5e9a;
    font-size: 2rem;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.more-btn {
    display: inline-block;
    background-color: #1a5e9a;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.more-btn:hover {
    background-color: #0f4c81;
}

/* 最新公告 */
.news {
    padding: 60px 0;
    background-color: #f0f5f9;
}

.news h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #1a5e9a;
    font-size: 2rem;
}

.news-list {
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    padding: 15px 0;
    border-bottom: 1px dashed #ccc;
    display: flex;
    align-items: center;
}

.news-item:last-child {
    border-bottom: none;
}

.date {
    color: #666;
    margin-right: 20px;
    min-width: 100px;
}

.news-item a {
    color: #333;
    text-decoration: none;
    flex: 1;
    transition: color 0.3s;
}

.news-item a:hover {
    color: #1a5e9a;
    text-decoration: underline;
}

.more-news {
    display: block;
    text-align: center;
    margin-top: 30px;
    color: #1a5e9a;
    text-decoration: none;
}

.more-news:hover {
    text-decoration: underline;
}

/* 校园活动 */
.events {
    padding: 60px 0;
    background-color: white;
}

.events h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #1a5e9a;
    font-size: 2rem;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.event-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.event-card:hover {
    transform: translateY(-5px);
}

.event-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.event-info {
    padding: 20px;
}

.event-info h3 {
    margin-bottom: 10px;
    color: #1a5e9a;
}

.event-date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

/* 校园美景 */
.gallery {
    padding: 60px 0;
    background-color: #f0f5f9;
    text-align: center;
}

.gallery h2 {
    margin-bottom: 30px;
    color: #1a5e9a;
    font-size: 2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

.view-more {
    display: inline-block;
    background-color: #1a5e9a;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.view-more:hover {
    background-color: #0f4c81;
}

/* 页脚 */
footer {
    background-color: #1a5e9a;
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: #fff;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
}

.wechat-qr {
    width: 120px;
    height: 120px;
    border: 5px solid white;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: #ddd;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 隐藏桌面导航，显示移动端菜单按钮 */
    .desktop-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .hero {
        height: 300px;
    }
    
    .slide-content h1 {
        font-size: 1.8rem;
    }
    
    .slide-content p {
        font-size: 1rem;
    }
    
    .about, .news, .events, .gallery {
        padding: 40px 0;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 250px;
    }
    
    .slide-content {
        padding: 15px;
    }
    
    .slide-content h1 {
        font-size: 1.5rem;
    }
    
    .slider-controls button {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}